Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Convert region into an array #103

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

feat: Convert region into an array #103

wants to merge 1 commit into from

Conversation

mitch-hamm
Copy link
Contributor

closes: #102

Allow passing an array of regions incase a customer has multiple regional deployments under one account and doesn't want to grant * access

@mitch-hamm mitch-hamm requested a review from a team as a code owner November 25, 2024 22:54
account_id = data.aws_caller_identity.current.account_id
additional_iam_policy_arns = distinct(compact(var.additional_iam_policy_arns))
allowed_iam_policies = join(", ", formatlist("\"%s\"", distinct(concat(local.additional_iam_policy_arns, local.default_allowed_iam_policies))))
arn_like_vpcs = formatlist("\"arn:%s:ec2:*:%s:vpc/%s\"", local.aws_partition, local.account_id, var.vpc_allowed_ids)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been updated from
arn:aws:ec2:${region}:717279720372:vpc/123456789
to
arn:aws:ec2:*:717279720372:vpc/123456789
Since we don't know which region in the array the VPC belongs to ahead of time. VPC ID is also more specific than the region so this shouldn't change any scope

@mitch-hamm mitch-hamm changed the title Convert region into an array feat: Convert region into an array Nov 29, 2024
@mitch-hamm mitch-hamm requested review from maxsxu and ciiiii December 2, 2024 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow multiple regions
1 participant